<template>
  <text>{{ time }}</text>
</template>
<script>
import { dataFormat } from '@/utils/oldIndex';

export default {
  name: 'DataFormat',
  props: ['date'],
  data: function () {
    return {
      time: '',
    };
  },
  watch: {
    '$props.date'(props) {
      this.time = dataFormat(this.date);
    },
  },
  mounted() {
    this.time = dataFormat(this.date);
  },
};
</script>
